import type { FormItemRule } from 'element-plus'
export const useValidator = () => {
  const required = (message?: string): FormItemRule => {
    return {
      required: true,
      message: message || '该项为必填项'
    }
  }
  return {
    required
  }
}
